package main

import (
	"fmt"
	"github.com/Akatsuki_z/bytedance-greenTrainingCamp03-backend-go-by-example/practice/homework/homework3/caiyun"
	"github.com/Akatsuki_z/bytedance-greenTrainingCamp03-backend-go-by-example/practice/homework/homework3/volcengine"
	"os"
	"sync"
)

func main() {
	if len(os.Args) != 2 {
		fmt.Fprintf(os.Stderr, `usage: simpleDict WORD 
example: simpleDict hello
		`)
		os.Exit(1)
	}
	var wg sync.WaitGroup
	queryWord := os.Args[1]
	wg.Add(2)
	go func() {
		defer wg.Done()
		//CaiyunQuery(queryWord)
		caiyun.Query(queryWord)
	}()
	go func() {
		defer wg.Done()
		//VolcengineQuery(queryWord)
		volcengine.Query(queryWord)
	}()
	wg.Wait()
}
